package main

import (
	"fmt"
)

func main() {
	c := make(chan int)

	go func() {
		for i := 0; i < 5; i++ {
			c <- i
			fmt.Println("Goroutine is writting")
		}
		close(c)
	}()

	for num := range c {
		fmt.Println("main is readding ", num)
	}
}
